
<!--详细内容左列-->
<div class="engine-tab-content-l">
    <div class="engine-test-manage engine-business">
        <div class="engine-test-manage-l">
            <input type="text" placeholder="属性名" ng-model="filterModelAttribute" class="project-name">
            <i class="icon-engine-search"></i>
        </div>

        <div class="engine-test-manage-r">
            <button type="button" class="engine-btn-default" ng-click="addAttribute()" pg-per="{{packageId}}|1" pg-sta="{{status}}|0"><i class="icon-engine-plus"></i>增加属性</button>
            <button type="button" class="engine-btn-default" ng-click="removeAll()" pg-per="{{packageId}}|1" pg-sta="{{status}}|0">删除全部属性</button>
        </div>
        <div class="engine-test-manage-r">
            <form  method="post" id="iconForm" enctype="multipart/form-data">
                <div style="background-color: #f5f5f5;font-size: 13px;padding-right: 10px"  class="engine-test-manage-r"><input type="button" ng-click="addFromJson()"   pg-per="{{packageId}}|1" pg-sta="{{status}}|0" value="导入"/></div>
                <div style="background-color: #f5f5f5;font-size: 13px;margin-top: 6px" class="engine-test-manage-r"><input type="file" style="height: 30px;width: 180px"  pg-per="{{packageId}}|1" pg-sta="{{status}}|0"/></div>
            </form>
        </div>
        <div class="clear"></div>
    </div>
    <!--属性值-->
    <div class="attribute-empty" ng-show="promPtShow">
        暂无属性值，请先增加属性
        <img src="/static/images/arrow-right.png">
    </div>
    <div class="engine-attribute engine-attribute-border engine-test-r-con" ng-show="detailsShow">
        <!--单个属性-->
        <table   width="100%">
            <tr  ng-repeat="modelAttribute in modelAttributes | filter:{name:filterModelAttribute}">
                <td ng-if="modelAttribute.dataType!='Object'">
                    <div class="model-value model-value-border" ng-click="editAttribute(modelAttribute.id,modelAttribute.name,modelAttribute.dataType,modelAttribute.valueType,modelAttribute.valueExpress,modelAttribute.parentId,modelAttribute.isMust)">
                        <div class="model-value-l"><span  class="engine-btn-model">{{modelAttribute.dataType | dataTypeFilter}}</span></div>
                        <div class="model-value-r">{{modelAttribute.name}}</div>
                        <div class="model-value-right">
                            <span class="results">{{modelAttribute.valueExpress| maxLength:24}}</span>
                            <span class="remove">{{modelAttribute.valueType | valueTypeFilter}}</span>
                        </div>
                        <div class="clear"></div>
                    </div>
                </td>
                <td ng-if="modelAttribute.dataType=='Object'" >
                    <div class="model-value model-value-border" ng-click="editAttribute(modelAttribute.id,modelAttribute.name,modelAttribute.dataType,modelAttribute.valueType,modelAttribute.valueExpress,modelAttribute.parentId,modelAttribute.isMust)">
                        <div class="model-value-l">
                            <button type="button" class="engine-btn-model" id="model{{modelAttribute.id}}" ng-click="viewObject(modelAttribute.id,1,modelAttribute.name,modelAttribute.dataType,modelAttribute.valueType,modelAttribute.valueExpress,modelAttribute.isMust)" >对象[+]</button>
                        </div>
                        <div class="model-value-r">{{modelAttribute.name}}</div>
                        <div class="model-value-right">
                            <span class="results">{{modelAttribute.valueExpress| maxLength:24}}</span>
                            <span class="plus"><a href="javascript:void(0)" ng-click="addSon(modelAttribute.id)"><i class="icon-engine-plus"></i></a></span>
                            <span class="remove">{{modelAttribute.valueType | valueTypeFilter}}</span>
                        </div>
                        <div class="clear"></div>
                    </div>
                    <div id="modelSon{{modelAttribute.id}}" >

                    </div>
                </td>
            </tr>
        </table>
        <!--单个属性结束-->

        <!--单个属性结束-->
    </div>
    <!--属性值结束-->
</div>
<!--详细内容左列结束-->
<!--详细内容右列-->
<div class="engine-tab-content-r" id="right-none" ng-show="rightNone">
    <div class="engine-test-r-tit attribute-details">属性详情</div>
    <div class="jt"><img src="../../static/images/arrow.png"></div>
    <div class="remind-r remind-r-attribute">
        <div class="tu"><i class="icon-engine-remind"></i></div>
        <div class="text">单击左侧某一属性，<p>这里将显示该属性详情。</div>
        <div class="clear"></div>
    </div>
</div>
<!--详细内容右列结束-->
<div class="engine-tab-content-r" id="right-add" ng-show="rightManager">
    <div class="engine-test-r-tit attribute-details">{{attributeName}}</div>
    <input type="hidden"  ng-model="attribute.id"/>
    <input type="hidden"  ng-model="attribute.businessModelId"/>
    <input type="hidden"  ng-model="attribute.parentId"/>

    <!--表单-->
    <form name="attributeForm" g-validator="BusinessModelAttribute_Save" data-invalid-msg="tooltipMessenger">
        <div class="engine-form">
            <div class="attribute-form-group">
                <div class="attribute-form-group-l">属性名：</div>
                <div class="attribute-form-group-r"><input type="text" class="" name="name" ng-model="attribute.name"></div>
                <div class="clear"></div>
            </div>
            <div class="attribute-form-group">
                <div class="attribute-form-group-l">组件类型：</div>
                <div class="attribute-form-group-r" >
                    <select   name="valueType" ng-model="attribute.valueType">
                        <option value="Constant" >常量</option>
                        <option value="InParameter">传参</option>
                        <option value="Rule">规则</option>
                        <option value="RemoteService">远程服务调用</option>
                        <option value="JDBC">JDBC组件</option>
                        <option value="Dubbo">Dubbo服务</option>
                    </select>
                </div>
                <div class="clear"></div>
            </div>
            <div class="attribute-form-group" ng-if="attribute.valueType=='Rule'||attribute.valueType=='RemoteService'||attribute.valueType=='JDBC'||attribute.valueType=='InParameter'||attribute.valueType=='Dubbo'?false:true">
                <div class="attribute-form-group-l">类型：</div>
                <div class="attribute-form-group-r">
                    <select  name="dataType"  ng-model="attribute.dataType">
                        <option ng-if="attribute.valueType=='InParameter'?false:true" value="Integer"  >整型</option>
                        <option ng-if="attribute.valueType=='InParameter'?false:true" value="String">字符串</option>
                        <option ng-if="attribute.valueType=='InParameter'?false:true" value="Double">浮点型</option>
                        <option ng-if="attribute.valueType=='InParameter'?false:true" value="Date">时间</option>
                        <option ng-if="attribute.valueType=='InParameter'?false:true" value="Boolean">布尔型</option>
                        <option ng-if="attribute.valueType=='InParameter'?false:true" value="Object">对象类型</option>
                    </select>
                </div>
                <div class="clear"></div>
            </div>
            <div class="attribute-form-group" ng-if="attribute.valueType=='InParameter'?true:false">
                <div class="attribute-form-group-l">是否对象：</div>
                <div class="attribute-form-group-r">
                    <select  name="attribute.isObjectType"  ng-model="attribute.isObjectType" ng-init="attribute.isObjectType=0">
                        <option  value="0">否</option>
                        <option  value="1">是</option>
                    </select>
                </div>
                <div class="clear"></div>
            </div>
            <div class="attribute-form-group" ng-if="attribute.valueType=='InParameter'?true:false">
                <div class="attribute-form-group-l">是否必填：</div>
                <div class="attribute-form-group-r">
                    <select  name="attribute.isMust"  ng-model="attribute.isMust" >
                        <option  value="false">否</option>
                        <option  value="true">是</option>
                    </select>
                </div>
                <div class="clear"></div>
            </div>

            <div ng-if="attribute.valueType=='Rule'">
                <div class="attribute-form-group">
                    <div class="attribute-form-group-l">项目编码：</div>
                    <div class="attribute-form-group-r"><input ng-model="attribute.groupId"></div>
                    <div class="clear"></div>
                </div>
                <div class="attribute-form-group">
                    <div class="attribute-form-group-l">规则编码：</div>
                    <div class="attribute-form-group-r"><input ng-model="attribute.artifactId"></div>
                    <div class="clear"></div>
                </div>
            </div>
            <div class="attribute-form-group" ng-if="attribute.valueType=='RemoteService'">
                <div class="attribute-form-group-l">服务名称：</div>
                <div class="attribute-form-group-r"><input type="text" class="" name="code" ng-model="attribute.serviceName"></div>
                <div class="clear"></div>
            </div>
            <div class="attribute-form-group" ng-if="attribute.valueType=='Dubbo'">
                <div class="attribute-form-group-l">服务名称：</div>
                <div class="attribute-form-group-r"><input type="text" class="" name="code" ng-model="attribute.dubboName"></div>
                <div class="clear"></div>
            </div>
            <div ng-if="attribute.valueType=='JDBC'">
                <div class="attribute-form-group" >
                    <div class="attribute-form-group-l">查询语句：</div>
                    <div class="attribute-form-group-r"><input type="text"  ng-model="attribute.sqlName"></div>
                    <div class="clear"></div>
                </div>
                <div class="attribute-form-group" >
                    <div class="attribute-form-group-l">获取字段：</div>
                    <div class="attribute-form-group-r"><input type="text"  ng-model="attribute.sqlColumn"></div>
                    <div class="clear"></div>
                </div>
            </div>
            <div ng-if="attribute.valueType=='JDBC'||attribute.valueType=='RemoteService'||attribute.valueType=='Rule'||attribute.valueType=='Dubbo'">
                <div class="attribute-form-group">
                    <div class="attribute-form-group-l"><a href="javascript:void(0);" ng-click="addParam()">添加参数</a></div>
                    <div class="attribute-form-group-r"></div>
                    <div class="clear"></div>
                </div>
                <div class="attribute-form-group" ng-repeat="param in attribute.params">
                    <div class="attribute-form-group-l">参数{{$index+1}}</div>
                    <div class="attribute-form-group-r"><input ng-model="param.value"/><a href="javascript:void(0)" ng-click="removeParam($index)"><img src="../../static/images/close.png"></a></div>
                    <div class="clear"></div>
                </div>
            </div>


            <div class="attribute-form-group" ng-if="attribute.valueType!='Rule'&&attribute.valueType!='JDBC'&&attribute.valueType!='RemoteService'&&attribute.valueType!='Dubbo'">
                <div class="attribute-form-group-l">表达式：</div>
                <div class="attribute-form-group-r"><textarea  cols="" rows="3" name="valueExpress" ng-model="attribute.valueExpress"></textarea></div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        </div>
    </form>
    <!--表单结束-->
    <!--操作栏-->
    <div class="action-bar" ng-show="addOper">
        <div class="action-bar-r">
            <button type="button" class="engine-btn-default" ng-click="add()"><i class="icon-engine-plus"></i>增加</button>
        </div>
        <div class="clear"></div>
    </div>
    <div class="action-bar" ng-show="editOper">
        <div class="action-bar-l" pg-per="{{packageId}}|1">
            <a href="javascript:void(0)" ng-click="delete(attribute.id)" pg-sta="{{status}}|1"><i class="icon-engine-delete"></i></a>
        </div>
        <div class="action-bar-r" pg-per="{{packageId}}|1">
            <button type="button" class="engine-btn-default"ng-click="edit()" pg-sta="{{status}}|0" ><i class="icon-engine-preservation"></i>保存</button>
        </div>
        <div class="clear"></div>
    </div>
    <!--操作栏结束-->
</div>
